﻿<%@ Page Title="" Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true"
    CodeFile="EditarAlumnos.aspx.cs" Inherits="Secretaria_EditarAlumnos" %>

<%@ Register Src="../Controles/jDatePick.ascx" TagName="jDatePick" TagPrefix="uc1" %>
<%@ Register Src="../Controles/TipoDocumento.ascx" TagName="TipoDocumento" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageContainer" runat="Server">

    <script src="../Libs/jquery.autocomplete.pack.js" type="text/javascript"></script>

    <script>
        $(document).ready(function() {
            $("#ctl00_PageContainer_Buscar").autocomplete("BuscarAlumnos.aspx", {
                width: 260,
                selectFirst: false
            });
            $("#ctl00_PageContainer_Buscar").result(function(event, data, formatted) {
                if (data) {
                    var sLoc = new String(window.location);
                    if (sLoc.indexOf("?") < 0) {
                        window.location = window.location + '?id=' + data[1];
                    } else {
                        window.location = sLoc.substr(0, sLoc.indexOf("?")) + '?id=' + data[1];
                    }
                }
            });

        });
    </script>

    <table width="100%">
        <tr>
            <td>
                <fieldset>
                    <table width="100%">
                        <tr>
                            <td>
                                Buscar Alumno:
                            </td>
                            <td>
                                <asp:TextBox ID="Buscar" runat="server" CssClass="input-text"></asp:TextBox>
                            </td>
                        </tr>
                        <tr><td colspan="2"><asp:Label ID="lblMensaje" runat="server" ForeColor="#0033CC"></asp:Label></td></tr>
                    </table>
                </fielset>
            </td>
        </tr>
        <tr>
            <td>
                <fieldset>
                    <table width="600px">
                        <tr class="none">
                            <td class="input-caption" style="width: 100px">
                                IdAlumno
                            </td>
                            <td>
                                <asp:TextBox ID="txtIdAlumno" runat="server" CssClass="input-text"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="input-caption" style="width: 100px">
                                Apellido
                            </td>
                            <td>
                                <asp:TextBox ID="txtApellido" runat="server" CssClass="input-text" Enabled="False" style="width:100%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="input-caption" style="width: 100px">
                                Nombre
                            </td>
                            <td>
                                <asp:TextBox ID="txtNombre" runat="server" CssClass="input-text" Enabled="False"  style="width:100%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="input-caption" style="width: 100px">
                                Domicilio
                            </td>
                            <td>
                                <asp:TextBox ID="txtDomicilio" runat="server" CssClass="input-text" style="width:100%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="input-caption" style="width: 100px">
                                Telefono
                            </td>
                            <td>
                                <asp:TextBox ID="txtTelefono" runat="server" CssClass="input-text" style="width:100%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="input-caption" style="width: 100px">
                                Email
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmail" runat="server" CssClass="input-text" style="width:100%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="input-caption">
                                Tipo Documento
                            </td>
                            <td>
                                <uc2:TipoDocumento ID="TipoDocumento1" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="input-caption" style="width: 100px">
                                Numero Doc
                            </td>
                            <td>
                                <asp:TextBox ID="txtNroDocumento" runat="server" CssClass="input-text"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="input-caption" style="width: 100px">
                                Fecha Nacimiento
                            </td>
                            <td>
                                <uc1:jDatePick ID="txtFechaNacimiento" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan='2' style="height: 17px">
                            </td>
                        </tr>
                        <tr>
                            <td colspan='2' class='barButtons'>
                                <asp:Button ID='cmdAccion' runat='server' CssClass='input-button' OnClick="cmdAccion_Click"
                                    Text="Nuevo" />
                                <asp:Button ID='cmdCancelar' runat='server' CssClass='input-button' Text='Cancelar' />
                                <br />
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </td>
        </tr>
    </table>
    <div style="display: none;">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay registros de datos para mostrar."
            OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnRowDeleting="GridView1_RowDeleting"
            OnPageIndexChanged="GridView1_PageIndexChanged" OnPageIndexChanging="GridView1_PageIndexChanging">
            <Columns>
                <asp:BoundField DataField="IdAlumno" HeaderText="IdAlumno" ReadOnly="True" SortExpression="IdAlumno" />
                <asp:BoundField DataField="Apellido" HeaderText="Apellido" />
                <asp:BoundField DataField="Nombre" HeaderText="Nombre" />
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <div id="noprint">
                            <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CommandName="Select"
                                ImageUrl="~/Images/b_edit.gif" Text="Ver" />
                        </div>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
